#ifndef __FLAG_H__
#define __FLAG_H__

#include <iostream>
using namespace std;

#include "flag_parameters.h"
#include "GLee.h"
#include <GL/gl.h>
#define GLX_GLXEXT_PROTOTYPES
#include <GL/glext.h>
#include <GL/glut.h>
#include <Cg/cgGL.h>
#include <cutil.h>
#include <vector_types.h>
#include "masse.h"

extern "C" void run_initMasses(pmasse & prev_pos, pmasse & cur_pos, pspring & springs, int width, int height, float pas, GLuint vbo);
extern "C" void run_computeFlag(pmasse & prev, pmasse & cur, pspring & springs, int width, int height, float gravity, float friction, float facteur_l, int dsp, GLuint vbo);

#define KEY_ESC 27

pmasse prev_pos;
pmasse cur_pos;
pspring springs;
int dsp = SHADED;
//int dsp = WIREFRAME;
bool pause = true;
GLuint vbo_shaded;
//GLuint vbo_wireframe;
//GLuint vbo_springs;
int window_width = WINDOW_WIDTH;
int window_height = WINDOW_HEIGHT;
int step1 = 0;
int step2 = 0;

bool initGL(int argc, char ** argv);
void initVBOs();
void keyboard(unsigned char key, int x, int y);
void timer1(int step);
void timer2(int step);
void display();

#endif
